<template>
	<view class="myupload">
		<view class="current">
		</view>
		<view class="myTitle">
			<!-- <view class="returLeft">
				<u-icon name="arrow-left" class="" size="24" color="#fff" @click="returnLeft"></u-icon>
			</view> -->
			<view class="titileCneter">
				新增项目
			</view>
		</view>
		<!-- <view class="my_view" :style="{height:height}">
			<projectDetail type="0" ref="project" class="project" />
		</view> -->
		<scroll-view enable-back-to-top=true scroll-y="true" :style="{height:height}" class="scrollHight" style="background: #f8f8fa;">
			<projectDetail type="0" ref="project" class="project" :edit="true" />
		</scroll-view>
		<m-tabbar native>
			<template v-slot:tabbar_index_1>
				<view class="custom_style">
					<view class="custom_style_icon"></view>
				</view>
			</template>
		</m-tabbar>
	</view>
</template>

<script>
	import projectDetail from '@/components/common/projectDetail.vue'
	export default {
		components: {
			projectDetail
		},
		data() {
			return {
				height: 0
			}
		},
		methods: {

		},
		onPullDownRefresh() {
			this.$refs.project.empt()
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		onShow() {
			this.typeList()
		},
		onLoad() {
			this.height = uni.getSystemInfoSync().windowHeight - 170 + 'px';
		},
		onShareAppMessage() {
			return {
				title: '瑞能电力',
				path: '/pages/upload/upload',
		
			}
		},
		onShareTimeline: function() {
			return {
				title: '瑞能电力',
				path: '/pages/upload/upload',
			}
		},
		methods: {
			typeList() {
				this.$refs.project.typeList()
			}
		},
		onReady() {
			//如果需要兼容微信小程序，并且校验规则中含有方法等，只能通过setRules方法设置规则。
			// this.$refs.form1.setRules(this.rules)

		},
	}
</script>
<style>
	page {
		background-color: #ffffff !important;
	}
</style>
<style lang="scss" scoped>
	::v-deep .u-textarea {
		// background-color: #fff !important;
	}

	::v-deep .upload {
		// padding: 0 50rpx 100rpx 50rpx !important;
		padding: 0 50rpx;
		margin: 0 !important;
		font-size: 28rpx;
	}
	.scrollHight {
		top: 80px;
		position: absolute;
		// top: 100px;
		// background: rgba(255, 255, 255, 0.5);
		overflow: scroll;
	}
	.my_view {
		margin-top: 60px;
		overflow-y: auto;
		position: initial;
		background: #fff;
		height: calc(100vh - 70px);
		padding-bottom: 50px;
	}

	.myupload {
		background: #fff;
		z-index: 110;
		width: 100vw;
	}

	.current {
		//影藏上个版本背景
		// background: url(../../static/my/bg.jpg);
		background-size: 100% 100%;
		height: 82px;
		background-repeat: no-repeat;
		position: fixed;
		top: 0;
		overflow: hidden;
		background: #47578E;
		left: 0;
		width: 100%;
		color: #fff;
		z-index: 0;
	}

	.myTitle {
		.returLeft {
			top: 34px;
			left: 40rpx;
			position: fixed;
		}

		.titileCneter {
			top: 85rpx;
			left: 50%;
			transform: translate(-50%);
			position: fixed;
			color: #fff;
			z-index: 110;
		}
	}

	.project {
		position: relative;
		margin-top: 150rpx;
	}

	.custom_style {
		color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;

		&_icon {
			// background-color: #15357A;
			background-image: url(../../static/tabble/tab2.png);
			font-size: 65rpx;
			width: 90rpx;
			height: 90rpx;
			border-radius: 100%;
			display: flex;
			background-repeat: no-repeat;
			background-size: 100%;
			justify-content: center;
			align-items: center;
			margin-top: -40rpx;
		}
	}
</style>
